﻿@model DLM.Web.ViewModel.BonusPageView
@using Webdiyer.WebControls.Mvc;
@using DLM.Web.MVC.Helper;
<h3>
    我的积分</h3>
<div class="tr clearfix">
    现有积分&nbsp; @Model.Bonus.Bonuses.Value @*@{ var bonus = Model.Bonus == null ? 0 : Model.Bonus.Bonuses.Value;}*@
    &nbsp;
        @Html.ActionLinkButton("", "Buy", "Trade", null, "btn_s market", "btnCharge")
</div>
<div class="tr clearfix">
    <table class="tb">
        <thead>
            <tr>
                <th colspan="3">
                    我的积分记录
                </th>
            </tr>
            <tr>
                <th>
                    时间
                </th>
                <th>
                    消费
                </th>
                <th>
                    详细
                </th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model.Log)
            {
                <tr>
                    <td>
                        @item.CreateDate
                    </td>
                    <td>
                        @item.Bonus
                    </td>
                    <td>
                        @item.Desc
                    </td>
                </tr>
            }
        </tbody>
    </table>
</div>
<div class="paging">
@Ajax.Pager(Model.Log as PagedList<DLM.Domain.Model.BonusLog>, new PagerOptions
{
    PageIndexParameterName = "page",
    CurrentPagerItemWrapperFormatString = "<span class=\"current\">{0}</span>",
    //NumericPagerItemWrapperFormatString = "<a>{0}</a>",
    PrevPageText = "<",
    NextPageText = ">",
    ShowNumericPagerItems = true,
    ShowFirstLast = false,
    ShowPrevNext = true,
    CssClass = "scott",
    MorePageText = "...",
    SeparatorHtml = ""
},
                new AjaxOptions { UpdateTargetId = "divLog" }
    )
    </div>

